Methods in some links, changed some function names, merged some functions in controllers and models