Improving readability

minor changes like adding comments or spacing things out more etc.