Refactor tests
Fix hidden profiles (CC @rodfersou)

Part of this fix was mistakenly included in 1b83e7349f0e76aac1e5b88fb28afd3fdb48a9ea.
Merge branch 'master' into issue_104_v20