Replaced unnecessary BigDecimals by Doubles as much as possible