Code cleanup

Added documentation, organized the import statements in each file, and
removed commented out code/comments that were no longer necessary

The pseudocode comments for the ECM impl are still present until someone
other than me confirms that it works properly