Removed unnecessary stuff and commented code