Generalized makeShape method
Cleaned up code.