Cleaned code and updated the method to refrence.