Enemy is nearly working correctly!
Moved some logic out of the main file.