Finished percept algorithm port
Cleaned up warnings