add autoencoder interface
minor improvements, separate into modular architecture