Removed extra spacing and unused code snippets