Separate into a static library and an executable

Authored by nienhueser on Dec 4 2016, 1:05 PM.