Changed bracket style from C to java
Implemented serialization