Function cleanup and better naming

Finished off documentation
Added Copyright/License