complete refactor and add proper smf support for smartos