added history implementation to separate branch
phpcs fixes