Fyfbd 117

Lots of work done for testability and basics of authorization.