Added error checking & CSS