Refactored code, comments for 2.1