Refactoring to make the source compilable