Started to make the code somewhat readable