removed unnecessary functions
removed notices (somehow my debug got turned off)
Merge branch 'master2'