Simplified units logic and updated test