Restructuring to separate main framework library and running application