You could use a library as a base.