Incredibly smelly HaXe/NME Code cobbled together very quickly by a newbie for OneGameAMonth