Deleted used and incorrect code
Moved formatting to its rightful place
removed log message
extracted leftpad into a utility library