Implements lastsyncdate and fixes some minor issues.

Closes #2 , Closes #66 and updates code to newest ongr strict standards
same here