Changed makefiles and resolved warnings