MA final project code snippets, spike and experimental code. Handle with care