Added draft of functional specification

First draft of functional spec