separated styles, reformat code and remove extra span