Combine addMessage functions, remove test print statements