memory leak and performance fixes
removed patch file
change long to quint64
remove files not ready for merging