Adding command handling

Adding routines to handle implementing the user's commands.