Cleans up unused classes and implements isDirty for MoleculesTable

Solves bug 3447