Refactor: migrated flash plugin to classes