added instructions.md, code cleanup