doxygen and coding convention

This should display the brief and detail class description in the
doxygen output and methods comments also done. i am yet to decide what
to do with the magic numbers in the main method which is simply for
testing