Added deposit field and code cleanup