Refactored to be more concise, consolidated
Added licensing info to README
Added file scope comments