More bug fixes. Develop mostly clean now
more bug fixes