Refactored autoencoders.