Changed a little on the structure in according to java convention.