Cleaned up sourcecode, added GNU licensing