Cleaned up the fx() function and fixed the height/width 'auto' bug.