Breaking out variables and fixing some indentation