Fixed NPE's in Method and small edits to other classes

Error: http://pastebin.com/9J0qAWTh Commit: d091ab9
Error: http://pastebin.com/sqiqfjin Commit: 7d9419d
Error: http://pastie.org/9383324 Commit: fbf533f