Solved 2 and 3. Good prime checking function in 3.