Altered methods in agent.java

Set up the whole thing to be able to read and update from agent.java