Reformatted code and added svg resize