refactored Model as Engine
moved game engine an base.hs monadic state transformation library-like function calls into Lib.hs