Initially based on OO Plugin Template Solution