refactor java.lang.Vector to java.lang.ArrayList and minor bugfixes