My final year project, maybe it shouldn't be open source...