Restructure source to ease navigation