More accurate results, returns "undefined" angle if not sure, fixes after review