Clean code and remove those incompatible with h5