Added some types. Removed commented code