updated api and restructured files