FInished and tested! Added JavaDoc as well.