Cleaned up the structure a little