separated project into frontend and library to reuse code.