Cleaned up code and updated spec.lua