Improved dashboard resize behaviour | Reformatted code