Minor changes

Re-written some code for readability