library module test and resolved minor bugs