Ready for submission

Code commented, tested and finalized for submission.