Removed logs, improved code