Added API classes, restructured package structure