Added handling of non-circle shapes when calculating some stats
Cleaned up code, deleted old comments and setup test flags to default value