Refactor YCM compile and messages