Current stable version. First real commit!

This is known bad code that we are planning to extensively refactor.