submission and contrib counts added. code refactored a bit. fixes #140