Code and documents for CS3240