Restructuring & added arithmetic functions