Do some code compression based on suggestion of jacobvosmaer