Cleaned up CPU code, added page boundary checking

Added to make sure we have a more accurate clock cycle system for CPU
and PPU synchronization.