Updated requirements document and changed code