Added Rules Groups and dependencies, added Trade.java, cleaned code and added JavaDocs