Initial commit with David's RBM and Carles's stuff