Refactor Behavior package and add Javadoc