Added ymLib.java/class and bug fix