Cleaned up the code and change the padding etc