Some coding related to the Masters project