cleaned up code and specs