Templates specs

dyalizer friendly spec 

some @spec were incomplete, outdated and

http://www.erlang.org/doc/apps/edoc/chapter.html#Type_specifications
Although the syntax described in the following can still be used for specifying functions we recommend that Erlang specifications as described in Types and Function Specification should be added to the source code instead. This way the analyses of Dialyzer's can be utilized in the process of keeping the documentation consistent and up-to-date.