added main network function
removed debug code
made generated names static
divided code into sections
added validation code functions
fixed brackeet place