Refactor classes, add examples