Bug fixing

Fixed bugs and testing out the engine more fully.