organized the code a bit, improved layout for smartphones and tablets