Fix bugs, gemify library