Replaced the old validation inside of beans.

Should be much clearer to read now. Many bugs opened up when doing it.