organized coding

moved set location of var showDetails
Removed unnecessary brackets
fixed indentation error.