added MARK-style comments mostly everywhere