Implementing the main processor