move to coffee script and recreate base structure