Miscellaneous learning code