Add more type definitions + documentation

Added type definitions for all top level bindings to compile
without problems with -Wall -Werror flags and also added some
comments