Cleaned up code structure

I revised all indentations to for spaces to adhere to uniform code design parameter noted in TODO.
The editor used for design should be set to insert 4 spaces upon tab press so as to keep our whitespace consistent and readable.
This also greatly helps with loop closing and function level reference.