added tests for supplements, some minor refactors