Moved Debug configuration to core.rb.
Refactored ui.js into multiple classes that takes careof each control type. Fixes #9.