Initial import from sourceforge code