Added utility functions, cleaned up submodules