refactor flipster, clean code from wp related code