Working on planning the code better