add n <1 for prime
refactored division method

added Integer factor method and select random from Array.
reworked prime method

Added prime module from std lib, over your code. simplified factor
finding.
refactored tests

removed redundancy in tests
Merge pull request #1 from danmaclean/master

some edits.