Comments, some asserts and returning functions