Move f3 code into api diretory. Upate routes and angular controllers