Separated code and fixed tab/space problems