[REM]Removed some unused code for account period and improved some code.