Added most of the code necessary to make Aloha run