Function expressions instead of declarations
Function expressions instead of declarations
Little refactoring
Made JSLint happy.