Split project into separate library and demo parts