Updated frontend part and API methods according to last changes (sqlalchemy)