Most jslint advice implemented, no inline returns for functions (for debugging).