Added core functionality and formalized interfaces. Added unit tests for core functionality.