Made final code clean ups and comments