Implemented more of the spec