moved class to another file / fixed a bug on options page