Final release. Code has been cleaned up and commented for clarity. Only what is needed is included.