Remove unused code
Fix record constructor issue