almost finished refactor, just need to fix property creation