solved some TODOs, tested memory allocation failure
added copyright notices to source code
resolved conflict