Ready for code review.

All major bugs were  resolved.