Performance tweaks and Updated Documentation for Logic parts
Merged with Kai's updates