Added CPU filter
Split code; now everything in several files