Edge boundaries implemented, boundaries made flexible