Add exceptions, comment all code, Bug checking and fixing