Cleaned up code, added option for space/no space between name and type