Formatting changes

Changed:
for
{
//stuff
}
to:
for{
//stuff
}
and put one line functions into .h file