Improve db

#8 @gsathya @ben-jones 
I changed directory structure and split server.py into models and views.
all these comments are making the code ugly. just use a constant and with a comment
```
# 15 chars for ip + 4 for netmask
IP_ADDR_LENGTH = 19
```