Added Constants.java and improved data validation