Moved all drawing operations to separate class.

Added logger. Made all modules follow the standard pattern (initialization
using the new keyword). Preparing for modularity - drawing will be handled
by separate module, which can use any JS graphics library.