Put type into separate attribute

Tried to run `rake spec` but it threw errors so I couldn't run the unit tests.