Code rejig

for better readability