refactored a lot, renamed test file to source file, split build file into specific variants, add doc stuff