More progress and bug fixes