Refactored, added elementary padding