Reordering a few methods, code cleanup