Add methods for profile and edit profile views, some other tweaks

Well imo it has the change. The only reason for all these defines is that they make replacing the database schema a lot easier. In this case this would just fail and you'd have to resort to manual grepping through the code => not good.