reorganized, seperated UI/API and abstract