Refactor of the samples page