Started fixing the bug inferno ...

Fixed a handful of bugs in the header and source files.
Further bugs are more related to mismatch between the usage of
Atoms in MyMD.cpp and the actual implementation of it.