Fixed some refs and added ajax select