Major rewrite, moved common object to new package and made them Serializable.