Polycals testing and Code Cleanup