Formatted source files and added javadoc. Also modified security mod. for simpleResource.