Current APD and CV calculation works, but rudimentary and some problems in calculation