Removed MLib.Shape

Also fixed several bugs.