Added submodules.
Initial work.
Better error messaging.
Refactored.
Updated readme.