fixed issues with decimals and reduced size of codebase