Improved "sendInstruction" and implemented "writeMemmory" functions