change to cmake for building, cleanup