Refactored code. Removed scaffolds and outdated comments.