Added some comments, implemented margin/padding shortening