Cleanup, comments and proper portscan detection