Fixed bags with Layer. Fixed tests for Layer