lots of changes to make engine more stable. will be adding proper key detection later. sleep now