refactoring
express api
small fixes - needs refactoring