Add names to anonymous method functions
Move event handlers to prototype, change DOM init method