Refactoring DeepAutoencoder