integrate viewporter library
improve modularity
add test demo