Imports added.
More documentation and cleanup.