Move stuff around and add library template