Calculating amount after page loads;
Scope for js variables are reduced;
Added import for dummy css file.