Implements lastsyncdate and fixes some minor issues.

Closes #2 , Closes #66 and updates code to newest ongr strict standards
maybe you need to check if all parameters is set