fixed messages problem and organized files