Edited Enemy algorithm and minor other changes