re-arranged some code. also, do we need to make javadoc comments for oncreate and onresume etc?