refactor and memory improvements
Merge remote-tracking branch 'origin/master'