Deleted unused code and fixed indents